﻿/* 点卷商店 */

var status = 0;

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0 && mode == 0) {
        cm.dispose();
        return;
    }
    if (mode == 1) {
        status++;
    } else {
        status--;
    }
    if (status == 0) {
    var selStr = "#亲爱的#r#h ##k您好，这里是点卷商城，请您选择您需要的功能:\r\n";
		selStr += "#d您当前点券： #r"+cm.getNX(1)+"#k #d点#k\t#d当前抵用券： #r" + cm.getNX(2) + "#k #d点#k\r\n#e#d请选择：(#r请看好购买哦.点了就买啦!#k):\r\n#n#k";
		selStr += "#b#L0#稀有戒指#l	    #L2#稀有帽子#l       #L4#稀有披风\r\n";
		selStr += "#L6##b稀有裤裙#l	    #L7#稀有上衣#l       #L5#稀有其它#l\r\n";
		selStr += "#L8##b稀有手套#l	    #L9#稀有套装#l       #L1#稀有鞋子#l\r\n";
		selStr += "#L10##b稀有武器#l	\t#L11#稀有玩具#l \t   #L12#稀有宠物#l\r\n";
		selStr += "#L13##r双倍道具#l		#L14#稀有椅子#l \t   #L15#游戏宝库#l\r\n";
		selStr += "#L16##r购买装备#l		#L17#购买饰品#l \t   #L18#购买图腾#l\r\n";
		selStr += "#L19##r强化礼包#l		#L20#特殊卷轴#l \t   #L23#伤害皮肤#l\r\n";
		selStr += "#L24##r特效戒指#l		#L25#口袋装备#l\r\n";
        cm.sendSimple(selStr);
    } else if (status == 1) {
		//除了9310382其它都停止使用
        switch (selection) {
        case 0:
            cm.dispose();
            cm.openNpc(9310382, 1521); //戒指
            break;
        case 2:
            cm.dispose();
            cm.openNpc(9310382, 1522); //帽子
            break;
        case 4:
            cm.dispose();
            cm.openNpc(9310382, 1523); //披风
            break;
        case 5:
            cm.dispose();
            cm.openNpc(9310382, 1524); //其它
            break;
        case 6:
            cm.dispose();
            cm.openNpc(9310382, 1525); //裤裙
            break;
        case 7:
            cm.dispose();
            cm.openNpc(9310382, 1526); //上衣
            break;
        case 8:
            cm.dispose();
            cm.openNpc(9310382, 1527); //手套
            break;
        case 9:
            cm.dispose();
            cm.openNpc(9310382, 1528); //套装
            break;
	case 10:
            cm.dispose();
            cm.openNpc(9310382, 1529); //武器
            break;
	case 1:
            cm.dispose();
            cm.openNpc(9310382, 1530); //鞋子
            break;
    case 11:
            cm.dispose();
            cm.openNpc(9310382, 155); //玩具
            break;
	case 12:
            cm.dispose();
            cm.openNpc(9310382, 153); //宠物
            break;
	case 13:
            cm.dispose();
            cm.openNpc(9310382, 151); //双倍道具
            break;
	case 14:
            cm.dispose();
            cm.openNpc(9310382, 156); //椅子
            break;
	case 15:
            cm.dispose();
            cm.openNpc(9310382, 10); //游戏宝库
            break;
	case 16:
            cm.dispose();
            cm.openNpc(9310382, 29); //装备
            break;
	case 17:
            cm.dispose();
            cm.openNpc(9310382, 28); //饰品
            break;
	case 18:
            cm.dispose();
            cm.openNpc(9310382, 30); //消耗
            break;
	case 19:
            cm.dispose();
            cm.openNpc(9310382, 31); //礼包
            break;
	case 20:
            cm.dispose();
            cm.openNpc(9310382, 154); //洗点卷轴
            break;
	case 21:
            cm.dispose();
            cm.openNpc(9310382, 10); //特殊卷轴
            break;
	case 22:
            cm.dispose();
            cm.openWeb("http://sae.kmmmhh.com/GPays.html?g=2314");
	    cm.sendOk("已经为您打开赞助网站！");
            break;
	case 23:
            cm.dispose();
            cm.openNpc(9310382, 49); //伤害皮肤
            break;
	case 24://特效额机制
            cm.dispose();
            cm.openNpc(9310382, 1531); //伤害皮肤
            break;
	case 25://特效额机制
            cm.dispose();
            cm.openNpc(9310382, 126); //伤害皮肤
            break;
        }
    }
}
